﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;
using Bymed.SpineScan.Service.Shared;

namespace Bymed.SpineScan.WPF.Converter
{
    public class TestItemBrightImageSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (GeneralUtility.IsPositiveInteger(value.ToString()))
            {
                return "/Skins/Resource/Image/TestItem/CustomizedTestItem-Bright.png";
            }
            else
            {
                return string.Format("/Skins/Resource/Image/TestItem/{0}-Bright.png", value);
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class TestItemDarkImageSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (GeneralUtility.IsPositiveInteger(value.ToString()))
            {
                return "/Skins/Resource/Image/TestItem/CustomizedTestItem-Dark.png";
            }
            else
            {
                return string.Format("/Skins/Resource/Image/TestItem/{0}-Dark.png", value);
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

    public class TestItemDemoImageSourceConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (GeneralUtility.IsPositiveInteger(value.ToString()))
            {
                return "/Skins/Resource/Image/TestItemDemo/CustomizedTestDemo.png";
            }
            else
            {
                return string.Format("/Skins/Resource/Image/TestItemDemo/{0}TestDemo.png", value);
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }

}
